fix batch img2img output dir with script #12926
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add opt
save_images_add_number_suffix
similar concept to add numbering prefix for image, but only when thre existing a file with the same name
this prevents files from being overwritten
currently for batch img2img the output dir will be ignored when a script such as XYZ is enabled
the image will be I'll put it to the default output
although this is undesirable but it is not catastrophic
using
save_images_add_number_suffix
this allows the use of original file name when script is usedthis fix makes it so that the output directory will be set the they specified directory in batch img2img regardless if a script is enabled or notif a script is active it will use the default user defined file name pattern for saving images
only when no script is active will the original file name be used as the output file name
the reason why this is done is because if we use the original file names scripts such as Xyz would generate multiple images of the same name and thus overriding previous generated filesnot sure but this might be a possible fix for [Bug]: Batch img2img with multiple X/Y/Z denoising values is only saving one image (WebUI 1.6.0)
I do have my doubts because what he is experiencing seems to be different issue
as
Sysinfo
is not uploaded I wasn't able to conduct further diagnosisChecklist: